package com.tencent.mm.opensdk.modelmsg;

import android.os.Bundle;
import android.util.Log;

import com.tencent.mm.opensdk.modelmsg.WXMediaMessage.IMediaObject;

public class WXWebpageObject implements IMediaObject {
    private static final int LENGTH_LIMIT = 10240;
    private static final String TAG = "MicroMsg.SDK.WXWebpageObject";
    public String canvasPageXml;
    public String extInfo;
    public String webpageUrl;

    public WXWebpageObject() {

    }

    public WXWebpageObject(String arg1) {
        this.webpageUrl = arg1;
    }

    public boolean checkArgs() {
        boolean v0;
        if (this.webpageUrl == null || this.webpageUrl.length() == 0 || this.webpageUrl.length() > 10240) {
            Log.e("MicroMsg.SDK.WXWebpageObject", "checkArgs fail, webpageUrl is invalid");
            v0 = false;
        } else {
            v0 = true;
        }

        return v0;
    }

    public void serialize(Bundle arg3) {
        arg3.putString("_wxwebpageobject_extInfo", this.extInfo);
        arg3.putString("_wxwebpageobject_webpageUrl", this.webpageUrl);
        arg3.putString("_wxwebpageobject_canvaspagexml", this.canvasPageXml);
    }

    public int type() {
        return 5;
    }

    public void unserialize(Bundle arg2) {
        this.extInfo = arg2.getString("_wxwebpageobject_extInfo");
        this.webpageUrl = arg2.getString("_wxwebpageobject_webpageUrl");
        this.canvasPageXml = arg2.getString("_wxwebpageobject_canvaspagexml");
    }
}

